package com.zxj.ds.mybatis.controller;

import com.framework.msg.db.WeichatAccount;
import com.framework.msg.db.businessTransaction.OrderRecord;
import com.zxj.ds.mybatis.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * @Author 朱小杰
 * @Date 2017/5/4 10:41:42
 * 说明这个类的作用...
 */
@Controller
public class HelloController {
    @Autowired
    private HelloService service;

    @RequestMapping("/")
    @ResponseBody
    public String a(){
        List<Map<String,Object>> users = service.getUsers();
        System.out.println(users);

        List<OrderRecord> orders = service.getOilOrder();
        System.out.println(orders);

        List<WeichatAccount> accounts = service.getAccounts();
        System.out.println(accounts);

        return "SUCCESS";
    }

    @ResponseBody
    @RequestMapping("/b")
    public String b(){
        service.b();
        return "b";
    }
}
